package com.itcncp.ucenter.dao.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class UserAccountDayExample implements Serializable {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private static final long serialVersionUID = 1L;

    public UserAccountDayExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria implements Serializable {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andStatisticDateIsNull() {
            addCriterion("statistic_date is null");
            return (Criteria) this;
        }

        public Criteria andStatisticDateIsNotNull() {
            addCriterion("statistic_date is not null");
            return (Criteria) this;
        }

        public Criteria andStatisticDateEqualTo(Date value) {
            addCriterionForJDBCDate("statistic_date =", value, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("statistic_date <>", value, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateGreaterThan(Date value) {
            addCriterionForJDBCDate("statistic_date >", value, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("statistic_date >=", value, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateLessThan(Date value) {
            addCriterionForJDBCDate("statistic_date <", value, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("statistic_date <=", value, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateIn(List<Date> values) {
            addCriterionForJDBCDate("statistic_date in", values, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("statistic_date not in", values, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("statistic_date between", value1, value2, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andStatisticDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("statistic_date not between", value1, value2, "statisticDate");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdIsNull() {
            addCriterion("account_day_id is null");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdIsNotNull() {
            addCriterion("account_day_id is not null");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdEqualTo(Long value) {
            addCriterion("account_day_id =", value, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdNotEqualTo(Long value) {
            addCriterion("account_day_id <>", value, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdGreaterThan(Long value) {
            addCriterion("account_day_id >", value, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdGreaterThanOrEqualTo(Long value) {
            addCriterion("account_day_id >=", value, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdLessThan(Long value) {
            addCriterion("account_day_id <", value, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdLessThanOrEqualTo(Long value) {
            addCriterion("account_day_id <=", value, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdIn(List<Long> values) {
            addCriterion("account_day_id in", values, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdNotIn(List<Long> values) {
            addCriterion("account_day_id not in", values, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdBetween(Long value1, Long value2) {
            addCriterion("account_day_id between", value1, value2, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andAccountDayIdNotBetween(Long value1, Long value2) {
            addCriterion("account_day_id not between", value1, value2, "accountDayId");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Long value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Long value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Long value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Long value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Long value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Long> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Long> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Long value1, Long value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Long value1, Long value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceIsNull() {
            addCriterion("previous_balance is null");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceIsNotNull() {
            addCriterion("previous_balance is not null");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceEqualTo(BigDecimal value) {
            addCriterion("previous_balance =", value, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceNotEqualTo(BigDecimal value) {
            addCriterion("previous_balance <>", value, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceGreaterThan(BigDecimal value) {
            addCriterion("previous_balance >", value, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("previous_balance >=", value, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceLessThan(BigDecimal value) {
            addCriterion("previous_balance <", value, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("previous_balance <=", value, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceIn(List<BigDecimal> values) {
            addCriterion("previous_balance in", values, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceNotIn(List<BigDecimal> values) {
            addCriterion("previous_balance not in", values, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("previous_balance between", value1, value2, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andPreviousBalanceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("previous_balance not between", value1, value2, "previousBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceIsNull() {
            addCriterion("end_balance is null");
            return (Criteria) this;
        }

        public Criteria andEndBalanceIsNotNull() {
            addCriterion("end_balance is not null");
            return (Criteria) this;
        }

        public Criteria andEndBalanceEqualTo(BigDecimal value) {
            addCriterion("end_balance =", value, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceNotEqualTo(BigDecimal value) {
            addCriterion("end_balance <>", value, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceGreaterThan(BigDecimal value) {
            addCriterion("end_balance >", value, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("end_balance >=", value, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceLessThan(BigDecimal value) {
            addCriterion("end_balance <", value, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("end_balance <=", value, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceIn(List<BigDecimal> values) {
            addCriterion("end_balance in", values, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceNotIn(List<BigDecimal> values) {
            addCriterion("end_balance not in", values, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("end_balance between", value1, value2, "endBalance");
            return (Criteria) this;
        }

        public Criteria andEndBalanceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("end_balance not between", value1, value2, "endBalance");
            return (Criteria) this;
        }

        public Criteria andIncomeIsNull() {
            addCriterion("income is null");
            return (Criteria) this;
        }

        public Criteria andIncomeIsNotNull() {
            addCriterion("income is not null");
            return (Criteria) this;
        }

        public Criteria andIncomeEqualTo(BigDecimal value) {
            addCriterion("income =", value, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeNotEqualTo(BigDecimal value) {
            addCriterion("income <>", value, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeGreaterThan(BigDecimal value) {
            addCriterion("income >", value, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("income >=", value, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeLessThan(BigDecimal value) {
            addCriterion("income <", value, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeLessThanOrEqualTo(BigDecimal value) {
            addCriterion("income <=", value, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeIn(List<BigDecimal> values) {
            addCriterion("income in", values, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeNotIn(List<BigDecimal> values) {
            addCriterion("income not in", values, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("income between", value1, value2, "income");
            return (Criteria) this;
        }

        public Criteria andIncomeNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("income not between", value1, value2, "income");
            return (Criteria) this;
        }

        public Criteria andExpendIsNull() {
            addCriterion("expend is null");
            return (Criteria) this;
        }

        public Criteria andExpendIsNotNull() {
            addCriterion("expend is not null");
            return (Criteria) this;
        }

        public Criteria andExpendEqualTo(BigDecimal value) {
            addCriterion("expend =", value, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendNotEqualTo(BigDecimal value) {
            addCriterion("expend <>", value, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendGreaterThan(BigDecimal value) {
            addCriterion("expend >", value, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("expend >=", value, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendLessThan(BigDecimal value) {
            addCriterion("expend <", value, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendLessThanOrEqualTo(BigDecimal value) {
            addCriterion("expend <=", value, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendIn(List<BigDecimal> values) {
            addCriterion("expend in", values, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendNotIn(List<BigDecimal> values) {
            addCriterion("expend not in", values, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("expend between", value1, value2, "expend");
            return (Criteria) this;
        }

        public Criteria andExpendNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("expend not between", value1, value2, "expend");
            return (Criteria) this;
        }

        public Criteria andRefundIsNull() {
            addCriterion("refund is null");
            return (Criteria) this;
        }

        public Criteria andRefundIsNotNull() {
            addCriterion("refund is not null");
            return (Criteria) this;
        }

        public Criteria andRefundEqualTo(BigDecimal value) {
            addCriterion("refund =", value, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundNotEqualTo(BigDecimal value) {
            addCriterion("refund <>", value, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundGreaterThan(BigDecimal value) {
            addCriterion("refund >", value, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("refund >=", value, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundLessThan(BigDecimal value) {
            addCriterion("refund <", value, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundLessThanOrEqualTo(BigDecimal value) {
            addCriterion("refund <=", value, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundIn(List<BigDecimal> values) {
            addCriterion("refund in", values, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundNotIn(List<BigDecimal> values) {
            addCriterion("refund not in", values, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("refund between", value1, value2, "refund");
            return (Criteria) this;
        }

        public Criteria andRefundNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("refund not between", value1, value2, "refund");
            return (Criteria) this;
        }

        public Criteria andCashinIsNull() {
            addCriterion("cashin is null");
            return (Criteria) this;
        }

        public Criteria andCashinIsNotNull() {
            addCriterion("cashin is not null");
            return (Criteria) this;
        }

        public Criteria andCashinEqualTo(BigDecimal value) {
            addCriterion("cashin =", value, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinNotEqualTo(BigDecimal value) {
            addCriterion("cashin <>", value, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinGreaterThan(BigDecimal value) {
            addCriterion("cashin >", value, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("cashin >=", value, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinLessThan(BigDecimal value) {
            addCriterion("cashin <", value, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinLessThanOrEqualTo(BigDecimal value) {
            addCriterion("cashin <=", value, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinIn(List<BigDecimal> values) {
            addCriterion("cashin in", values, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinNotIn(List<BigDecimal> values) {
            addCriterion("cashin not in", values, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cashin between", value1, value2, "cashin");
            return (Criteria) this;
        }

        public Criteria andCashinNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cashin not between", value1, value2, "cashin");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria implements Serializable {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion implements Serializable {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}